import os
import sys
from calendar import month

# 请在此输入您的代码
# 设置递归深度
sys.setrecursionlimit(10**5)
MOD = 998244353
x = int(input())

def f(x,cnt):

    if x<=10:
        return x*(x-1) %MOD

    else:
        cnt = 2*x*f(x-6,cnt)%MOD
        return cnt

print(f(x,1))

